<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2020/1/8
 * Time: 15:53
 */

namespace app\common\service;

//服务端版本
use think\Db;

class ServerVersion
{
    /**
     * @name 获取服务端版本
     * @author wx
     * @date 2020/1/8 15:54
     */
    public function getServerVersion()
    {
        $platformVersion = Db::name('host')->where('group_id', -1)->value('client_version');

        return $platformVersion;
    }

    /**
     * @name 设置服务端版本
     * @param $version
     * @author wx
     * @date 2020/1/8 16:01
     */
    public function setServerVersion($platformVersion)
    {
        Db::name('host')->where('group_id', -1)->update(['client_version' => $platformVersion]);
    }

}